<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ taglib prefix="his_fns" uri="/WEB-INF/tlds/his_fns.tld" %>
<div class="content-wrap">
    <div class="wrapper" style="bottom: 50px;">
        <ul class="nav nav-tabs">
            <li><a href="#" onclick="loadDiv('nurseIndexDiv','${ctx}/nurse/index')">床位列表</a></li>
            <li class="active">
                <a href="#" onclick="loadDiv('nurseIndexDiv','${ctx}/doctor/patVisit/patVisitInfo?inFlag=0')">在院病人</a>
            </li>

        </ul>
        <section class="panel panel-default">
            <div class="panel-body">
                <div class="table-responsive no-border">
                    <div class="datatable-top">
                        <div class="pull-left">

                                    <form:form id="searchForm" modelAttribute="patVisit"
                                               onsubmit="return loadDivForm('nurseIndexDiv','searchForm','${ctx}/doctor/patVisit/patVisitInfo');"
                                               method="post" class="form-inline">
                                        <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                        <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                        <input name="inFlag" type="hidden" value="0">
                                        <input name="deptFlag" type="hidden" value="1">
                                        <label>姓名 ：</label><form:input path="patVisitIndex.name" htmlEscape="false"
                                                                       maxlength="50"
                                                                       class="form-control"/> &nbsp;&nbsp;&nbsp;
                                        <label>住院号 ：</label><form:input path="visitNo" htmlEscape="false" maxlength="50"
                                                                        class="form-control"/> &nbsp;&nbsp;&nbsp;
                                        &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                                    </form:form>
                        </div>
                    </div>
                    <table id="contentTable" class="table table-bordered mg-t datatable">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>房间号</th>
                            <th>床号</th>
                            <th>床标号</th>
                            <th>床位等级</th>
                            <th>姓名</th>
                            <th>年龄</th>
                            <th>性别</th>
                            <th>身份证号</th>
                            <th>身份</th>
                            <th>费别</th>
                            <th>住院号</th>
                            <th>入院日期</th>
                            <th>费用余额</th>
                            <th>计价费用</th>
                            <th>实际应收费用</th>
                            <th>经治医生</th>
                            <th>责任护士</th>
                            <th>病情</th>
                            <th>护理</th>
                            <th>诊断</th>
                            <th>科室</th>
                            <th>病区</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${list}" var="patVisit" varStatus="coun">
                            <tr>
                                <td> ${coun.count} </td>
                                <td>${patVisit.room_no}</td>
                                <td>${patVisit.bedno}</td>
                                <td>${patVisit.bed_label}</td>
                                <td>${his_fns:getClinicName(patVisit.bed_grade)}</td>
                                <td> ${patVisit.name} </td>
                                <td> ${patVisit.age} </td>
                                <td> ${fns:getDictLabel(patVisit.sex, 'SEX_DICT', '')} </td>
                                <td> ${patVisit.id_no} </td>
                                <td>${fns:getDictLabel(patVisit.identity, 'PROFESSION_DICT', '')}</td>
                                <td>${fns:getDictLabel(patVisit.charge_type, 'CHARGE_TYPE_DICT', '')}</td>
                                <td> ${patVisit.visit_no} </td>
                                <td>${patVisit.admission_date}</td>
                                <td>${patVisit.balance}</td>
                                <td>${patVisit.total_costs}</td>
                                <td>${patVisit.total_charges}</td>
                                <td>${fns:getUserName(patVisit.doctor_in_charge)}</td>
                                <td>${fns:getUserName(patVisit.duty_nurse)}</td>
                                <td> ${fns:getDictLabel(patVisit.situation_type, 'PATIENT_STATUS_DICT', '')} </td>
                                <td> ${fns:getDictLabel(patVisit.nursing_class, 'NURSING_CLASS_DICT', '')} </td>
                                <td>${patVisit.diagnosis}</td>
                                <td> ${fns:getDeptName(patVisit.dept_stayed, '')} </td>
                                <td> ${fns:getDeptName(patVisit.ward_code, '')} </td>

                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
        </section>
    </div>
</div>